package com.example.demo.demos.web;

import lombok.Data;

@Data
public class Result<T> {

    //返回码
    private String returnCode;

    //返回消息
    private String returnReason;

    //返回数据
    private T data;

    public Result(){}

    // 返回数据
    protected static <T> Result<T> build(T data) {
        Result<T> result = new Result<T>();
        if (data != null)
            result.setData(data);
        return result;
    }




}
